It is a common programming pattern to iterate over data structures to create an array of data structures. The array is often expressed using a single array symbol, whereas individual values of the array are expressed using the array symbol in combination with a unique lookup key. An array that is represented in such a manner will be referred to herein as a “keyed array”.
Several examples of keyed arrays will be briefly described. First, an indexed array is a special case of a keyed array, in which the lookup key is an integer. In indexed arrays, the integer lookup key might typically be represented as a subscript of the array symbol. For example, “x” might represent an array of four data structures. The integer lookup keys might be, for example, 0, 1, 2 and 3. The individual values of the array might thus be represented by x0, x1, x2 and x3.
In a more general keyed array, the array values might be from a particular column of a table. The corresponding lookup keys might be from another column of the table, wherein the array symbol in combination with the lookup key from a particular row is bound to the corresponding value of that same row.
Conventionally, computer programming languages permit one or more indexed arrays to be represented within an indexed expression. However, the indices of the array are explicit in that they are defined somewhat separately from the values of the arrays within the indexed expression.
For instance, in one example (hereinafter referred to as “array definition example”), a computer program could declare or define an array of length three, for instance, with the expression “var A=new int[3];”. This expression declares A to be an array of integers of length 3, which also declares the index set of A to be integers 0, 1 and 2. To access, or refer to, or express references to the array, the computer programmer would write separate code. For instance, to copy the values of array B to another array A, the computer programmer might write the following code:                for (var i=0; i<A. Count( ); i++)                    A[i]=B[i];In this example, the indices are represented in the square brackets in the two indexed arrays A[i] and B[i].                        
Extending the array definition to another example (called herein the “dot product example”), suppose now that the arrays A[i] and B[i] are to be subjected to a further operation such as the calculation of their dot product. This might be accomplished using the following code:                var C=0;                    for (var i=0; i<A. Count( ); i++)                            C+=A[i]*B[i];In the array definition example, an iteration loop was used to assign values to the array A[i]. In the dot product example, another iteration loop was used to perform an operation on the array A[i] (in this example, a dot product with respect to another array B[i]).                                                
Another example of an operation performed on two arrays is the calculation of outer product elements of two arrays (hereinafter, the “outer product element example”). For instance, the following code might be used to calculate the outer product elements D[i, j] of array A[i] and B[i]:                for (var i=0; i<A.Count( ); i++)                    for (var j=0;j<B.Count( );j++)                            D[i, j]=A[i]*B[j];                                                
Accordingly, in conventional computer program, arrays are iterated over in order to assign values to arrays, and perform operations on those arrays. Furthermore, those iterative loops are expressed in the computer program itself.